import java.util.Scanner;

public class Main2 {

    public static double getLen(ZuoBiao n1, ZuoBiao n2) {
        return Math.pow(Math.pow(n1.x -n2.x, 2) + Math.pow(n1.y - n2.y, 2), .5);
    }
    public static double getP(double l1, double l2, double l3) {
        return (l1 + l2 + l3) / 2;
    }
    public static double getS(ZuoBiao n1, ZuoBiao n2, ZuoBiao n3) {
        double l1 = getLen(n1, n2);
        double l2 = getLen(n1, n3);
        double l3 = getLen(n2, n3);
        double p = getP(l1, l2, l3);
        return Math.pow(p * (p - l1) * (p - l2) * (p - l3), .5);
    }
    public static ZuoBiao setZuoB(ZuoBiao start, ZuoBiao end, double p) {
        return new ZuoBiao(start.x + (end.x - start.x) * p, start.y + (end.y - start.y) * p);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double l,r;
        l = in.nextDouble();
        r = in.nextDouble();
        ZuoBiao A = new ZuoBiao(in.nextDouble(), in.nextDouble());
        ZuoBiao B = new ZuoBiao(in.nextDouble(), in.nextDouble());
        ZuoBiao C = new ZuoBiao(in.nextDouble(), in.nextDouble());
        double totalP = l;//初始的比例
        double p = (r - l) / 100;//单位的比例
        ZuoBiao E = setZuoB(A, C, totalP);
        ZuoBiao D = setZuoB(C, B, totalP);
        ZuoBiao F = setZuoB(B, A, totalP);
        double min = getS(E, D, F);
        for (int i = 0; i < 100; i++) {
            double s = getS(E,D,F);
            E = setZuoB(A, C, totalP);
            D = setZuoB(C, B, totalP);
            F = setZuoB(B, A, totalP);
            if(s < min) {
                min = s;
            }
            totalP += p;
        }
        E = setZuoB(A, C, r);
        D = setZuoB(C, B, r);
        F = setZuoB(B, A, r);
        double s = getS(E, D, F);
        if(min > s) {
            min = s;
        }
        System.out.println(min);
    }
}

class ZuoBiao {
    public double x;
    public double y;

    public ZuoBiao() {
    }

    public ZuoBiao(double x, double y) {
        this.x = x;
        this.y = y;
    }
}